import 'dart:convert';
import 'dart:io';
import 'dart:math';

import 'package:bruno/bruno.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import 'package:get/get.dart';
import 'package:jinke/utils/colors_util.dart';

initalizeView() {
  //设置导航栏
  SystemChrome.setSystemUIOverlayStyle(
    const SystemUiOverlayStyle(
      systemNavigationBarColor: Color(0xFF000000),
      systemNavigationBarDividerColor: null,
      statusBarColor: Colors.transparent,
      systemNavigationBarIconBrightness: Brightness.dark,
      statusBarIconBrightness: Brightness.dark,
      statusBarBrightness: Brightness.light,
    ),
  );
  SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
      overlays: [SystemUiOverlay.bottom, SystemUiOverlay.top]);

  /// bruno主题配置
  BrnInitializer.register(
    allThemeConfig: BrnAllThemeConfig(
      // 全局配置
      commonConfig: BrnCommonConfig(
        brandPrimary: ColorsUtil.blue,
        brandAuxiliary: Color.fromARGB(26, 88, 193, 101),
      ),
      // dialog配置
      dialogConfig: BrnDialogConfig(radius: 12.0),
    ),
  );
}
